package com.suning.sawp.intf.assistant;

import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 〈一句话功能简述〉<br> 
 * 〈功能详细描述〉
 *
 * @author 14060883
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本] （可选）
 */
public class Result<T> {
    /**
     * 1 成功，0 失败
     */
    private String successFlg;
    private String errorMsg;
    private T data;
    
    public Result(){
        this.successFlg = "1";
    }
    
    public Result(T data){
        this.successFlg = "1";
        this.setData(data);
    }

    public String getSuccessFlg() {
        return successFlg;
    }

    public void setSuccessFlg(String successFlg) {
        this.successFlg = successFlg;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
    @Override
    public String toString(){
        return ToStringBuilder.reflectionToString(this);
    }
}
